#! /bin/sh

name=init
skip_pkg_check=yes
version=0.0git
revision=1
source_dir="init"
hostdeps="gcc v"
deps="core-libs"

build() {
    cp -rp "${source_dir}"/. ./

    set -x

    local PROD_FLAG=""
    if [ "$PROD" = "true" ]; then
        PROD_FLAG="-prod"
    fi
    VCROSS_COMPILER_NAME=${OS_TRIPLET}-gcc v -os vinix -gc none $PROD_FLAG -cflags "$TARGET_CFLAGS" -ldflags "$TARGET_LDFLAGS" .

    set +x
}

package() {
    install -d "${dest_dir}/usr/bin"
    install init "${dest_dir}/usr/bin/"

    post_package_strip
}
